<?php
namespace app\controller;
use think\annotation\Route;
use app\facade\Test;
/**
 * Class Address
 * @package app\controller
 */
class Address
{
    /**
     * @return string
     */
    public function index(){
        //echo session('name');
        //return 'index';
        $url = url('address/back');
        return '<a href="'.$url.'">返回<a>';
    }
    public function back(){
        //with是防止死机的
        return redirect('1')->with('flag','1')->restore();
    }

    public function details($id){
        return '详情id：'.$id;
    }

    public function url(){
        return url('Address/details',['id'=>5]);
    }

    public function read($name){
        return '读取id：'.$name;
    }
    public function test(){
        //return \app\facade\Test::hello('world');
        return Test::hello('world');
    }
}